package com.ruoyi.web.admin.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.admin.mapper.TdmBaoJianShengWuMapper;
import com.ruoyi.web.admin.domain.TdmBaoJianShengWu;
import com.ruoyi.web.admin.service.ITdmBaoJianShengWuService;

/**
 * 保健生物制剂Service业务层处理
 * 
 * @author ly
 * @date 2022-03-10
 */
@Service
public class TdmBaoJianShengWuServiceImpl implements ITdmBaoJianShengWuService 
{
    @Autowired
    private TdmBaoJianShengWuMapper tdmBaoJianShengWuMapper;

    /**
     * 查询保健生物制剂
     * 
     * @param id 保健生物制剂主键
     * @return 保健生物制剂
     */
    @Override
    public TdmBaoJianShengWu selectTdmBaoJianShengWuById(Long id)
    {
        return tdmBaoJianShengWuMapper.selectTdmBaoJianShengWuById(id);
    }

    /**
     * 查询保健生物制剂列表
     * 
     * @param tdmBaoJianShengWu 保健生物制剂
     * @return 保健生物制剂
     */
    @Override
    public List<TdmBaoJianShengWu> selectTdmBaoJianShengWuList(TdmBaoJianShengWu tdmBaoJianShengWu)
    {
        return tdmBaoJianShengWuMapper.selectTdmBaoJianShengWuList(tdmBaoJianShengWu);
    }

    /**
     * 新增保健生物制剂
     * 
     * @param tdmBaoJianShengWu 保健生物制剂
     * @return 结果
     */
    @Override
    public int insertTdmBaoJianShengWu(TdmBaoJianShengWu tdmBaoJianShengWu)
    {
        tdmBaoJianShengWu.setCreateTime(DateUtils.getNowDate());
        return tdmBaoJianShengWuMapper.insertTdmBaoJianShengWu(tdmBaoJianShengWu);
    }

    /**
     * 修改保健生物制剂
     * 
     * @param tdmBaoJianShengWu 保健生物制剂
     * @return 结果
     */
    @Override
    public int updateTdmBaoJianShengWu(TdmBaoJianShengWu tdmBaoJianShengWu)
    {
        tdmBaoJianShengWu.setUpdateTime(DateUtils.getNowDate());
        return tdmBaoJianShengWuMapper.updateTdmBaoJianShengWu(tdmBaoJianShengWu);
    }

    /**
     * 批量删除保健生物制剂
     * 
     * @param ids 需要删除的保健生物制剂主键
     * @return 结果
     */
    @Override
    public int deleteTdmBaoJianShengWuByIds(Long[] ids)
    {
        return tdmBaoJianShengWuMapper.deleteTdmBaoJianShengWuByIds(ids);
    }

    /**
     * 删除保健生物制剂信息
     * 
     * @param id 保健生物制剂主键
     * @return 结果
     */
    @Override
    public int deleteTdmBaoJianShengWuById(Long id)
    {
        return tdmBaoJianShengWuMapper.deleteTdmBaoJianShengWuById(id);
    }
}
